﻿//-----------------------------------------------------------------------
// <copyright file="MemberDef.cs" company="tuliprules.org">
//     Copyright (c) 2010 tuplelister, tuliprules.org.
// </copyright>
// <summary>This is the MemberDef class.</summary>
//-----------------------------------------------------------------------


namespace Tulip.Rules.CodeGen.Models.ClosedWorld
{
    using System.Collections.Generic;
    using System.Diagnostics.CodeAnalysis;
    using Engine.Models.ClosedWorld;

    /// <summary>
    /// Definition for member of a generated type.
    /// </summary>
    [SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1401:FieldsMustBePrivate",
        Justification = "Reviewed. Suppression is OK here.")]
    public class MemberDef
    {
        /// <summary>
        /// The name of the member of the generated type.
        /// </summary>
        public string Name;

        /// <summary>
        /// The position of the index.
        /// </summary>
        public int PositionIndex;

        /// <summary>
        /// Indicates if the member of the generated type is cached.
        /// </summary>
        public bool IsCached;

        /// <summary>
        /// The fact name.
        /// </summary>
        public string FactName;

        /// <summary>
        /// The name of the assembly that houses the bound member type.
        /// </summary>
        public string BoundMemberTypeAssemblyName;

        /// <summary>
        /// The name of the bound member type.
        /// </summary>
        public string BoundMemberTypeName;

        /// <summary>
        /// The name of the bound member.
        /// </summary>
        public string BoundMemberName;

        /// <summary>
        /// The kind of bound member.
        /// </summary>
        public MemberKind BoundMemberKind;

        /// <summary>
        /// The visibility of the bound member type.
        /// </summary>
        public MemberVisibility BoundMemberVisibility;

        /// <summary>
        /// Indicates if the bound member type is static.
        /// </summary>
        public bool BoundMemberIsStatic;

        /// <summary>
        /// Collection of parameters for the member of the generated type.
        /// </summary>
        public IEnumerable<ParameterDef> Parameters;
    }
}
